<script lang="ts" setup>
import { ref } from "vue"
import { useUserStore } from "@/store/modules/user"
import AdminDashboard from "./admin/index.vue"
import StudentDashboard from "./student/index.vue"
import { authType } from "@/api/login/types/login"

const userStore = useUserStore()
const currentRole = ref<authType>("")
currentRole.value = userStore.auth
</script>

<template>
  <component :is="currentRole === '1' || currentRole === '2' ? AdminDashboard : StudentDashboard" />
</template>
